<script setup>
import { RouterLink, RouterView,useRouter} from 'vue-router'

const routerArr = useRouter().getRoutes();

</script>
<template>
  <div class="wrapper">
    <nav>
      <RouterLink v-for="(item,index) in routerArr" :to="item.path">{{item.name }}</RouterLink>
    </nav>
    <div class="war_view_box">
      <RouterView />
    </div>
  </div>
</template>

<style scoped>

.wrapper{
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  place-items: flex-start;
  flex-wrap: wrap;
  overflow: hidden;
}

nav {
  width: 10%;
  height: 100%;
  padding: 1%;
  font-size: 12px;
  display: flex;
  flex-direction: column;
}

.war_view_box{
  width: 88%;
  height: 100%;
}

nav a.router-link-exact-active {
  color: var(--color-text);
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: inline-block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
  border: 0;
}
/* 
@media (min-width: 1024px) {
  header {
    display: flex;
    place-items: center;
    padding-right: calc(var(--section-gap) / 2);
  }

  header .wrapper {
    display: flex;
    place-items: flex-start;
    flex-wrap: wrap;
  }

  nav {
    text-align: left;
    margin-left: -1rem;
    font-size: 1rem;
    padding: 1rem 0;
    margin-top: 1rem;
  }
} */
</style>
